<?php
$tableinfo = $this->tableinfo;
$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
if ($id == 0) {
    $actionname = 'add';
    $tableinfo['enable'] = 1;
    $tableinfo['projmoduleid'] = $tableinfo['parentid'] = 0;
    $tableinfo['field'] = $tableinfo['infofield'] = $tableinfo['defaorder'] = $appmodulename = $parentdir = '';
    $tableinfo['numperpage'] = 15;
    $tableinfo['pagenumshown'] = 10;
} else {
    $actionname = 'edit';
    $appmodulename = $parentdir = '';
}
?>
<script>
    (function($){

    })(jQuery);
</script>
<div class="pageContent">
    <form method="post" action="?c=<?= app::$CONTROLLER_NAME ?>&a=<?= $actionname ?>&id=<?= $id ?>" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
        <div class="pageFormContent" layoutH="56">
            <dl>
                <dt>是否启用：</dt>
                <dd><span style="color:green;"><input type="radio" name="enable" value="1"<? if ($tableinfo['enable'] == 1) { ?> checked="checked"<? } ?> />启用</span>
                    <span style="color:red;"><input type="radio" name="enable" value="0"<? if ($tableinfo['enable'] == 0) { ?> checked="checked"<? } ?> />禁用</span></dd>
            </dl>
            <dl>
                <dt>所属项目模块：</dt>
                <dd>
                    <input type="text" name="parentclassinfo.appmodulename" readonly="readonly" class="required" value="<?= $appmodulename ?>"/>
                    <input type="hidden" target="projmoduleid" id="projmoduleid" name="parentclassinfo.projmoduleid" readonly="readonly" value="<?= $tableinfo['projmoduleid'] ?>"/>
                    <a class="btnLook" href="?c=sys_projmodule&a=list" lookupGroup="projmoduleinfo">查找带回</a>
                </dd>
            </dl>
            <dl>
                <dt>所属菜单分类：</dt>
                <dd>
                    <input type="text" id="parentclassinfo_parentdir"  name="parentclassinfo.parentdir" class="required" readonly="readonly" value="<?= $parentdir ?>"/>
                    <input type="hidden" name="parentclassinfo.id" readonly="readonly" value="<?= $tableinfo['parentid'] ?>"/>
                    <a class="btnLook" href="?c=sys_menuclass&a=list&projmoduleid={projmoduleid}" lookupGroup="parentclassinfo">查找带回</a>
                    <a href="javascript:void(0)" id="settopclass">设为顶层</a>
                </dd>
            </dl>
            <dl>
                <dt>字段列表：</dt>
                <dd><input type="text" name="field" class="required" value="<?= $tableinfo['field'] ?>" alt=""/></dd>
            </dl>
            <dl>
                <dt>默认排序：</dt>
                <dd><input type="text" name="defaorder" class="required" value="<?= $tableinfo['defaorder'] ?>" alt=""/></dd>
            </dl>
            <dl>
                <dt>单页最大数：</dt>
                <dd><input type="text" name="numperpage" class="required" value="<?= $tableinfo['numperpage'] ?>" alt=""/></dd>
            </dl>
            <dl>
                <dt>显示页面数：</dt>
                <dd><input type="text" name="pagenumshown" class="required" value="<?= $tableinfo['pagenumshown'] ?>" alt=""/></dd>
            </dl>
            <dl>
                <dt>信息字段：</dt>
                <dd><input type="text" name="infofield" class="required" value="<?= $tableinfo['infofield'] ?>" alt=""/></dd>
            </dl>
        </div>
        <div class="formBar">
            <ul>
                    <!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
                <li>
                    <div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
                </li>
            </ul>
        </div>
    </form>
</div>
